-- card: 4153 from stack: in -- bmap block id: 4573 -- flags: 0000 -- background id: 2696 -- name: Move Objects ----- HyperTalk script ----- on closeCard global movedList lock screen show button "Hex" at loc of card field "HexStart" repeat with w = 1 to 3 put "Word" & w into fieldName put fieldName & " Start" into startField show cd fld fieldName at the loc of card field startField end repeat repeat with w = 1 to 4 put "Alph" & w into fieldName put fieldName & " Start" into startField show cd fld fieldName at the loc of card field startField end repeat put empty into movedList pass closeCard end closeCard --————————-- -- MoveMe -- --————————-- -- created by Jim Taylor 2/89 -- Microcomputer Support for Curriculum -- 101 HRCB, Brigham Young University, Provo, UT 84602 (801)378-6446 -- taylorj@byuvax.bitnet -- -- This code has been released into the public domain. -- -- Lets the user moves a button or field. -- Must be called on mouseDOWN. -- Make the "start" and "correct" fields BEFORE you make the -- object, so it will be in front of them. -- on moveMe startField, correctField if the loc of target is within the rect of cd fld correctField then exit moveMe -- don't move if already in correct spot repeat until the mouse is up show target at the mouseLoc end repeat if the loc of target is within the rect of cd fld correctField then show target at the loc of card field correctField rightSound else wrongSound show target at the loc of card field startField end if end moveMe on alphabetize fieldName global movedList -- move the word repeat until the mouse is up show target at the mouseLoc end repeat -- see if it's in one of the boxes put empty into inBox repeat with w = 1 to 4 put "Alph" & w & " Correct" into boxField if the loc of cd fld fieldName is within the rect of cd fld boxField then put boxField into inBox end repeat if inbox is empty then -- not in box, put it back put fieldName & " Start" into startField show cd fld fieldName at the loc of card field startField else -- in box, center it and remember that we moved it show cd fld fieldName at the loc of card field inBox if fieldName & "," is not in movedList then put fieldName & "," after movedList end if end if -- if all the words have been moved, check them if number of items in movedList is 4 then put true into allCorrect repeat with w = 1 to 4 put "Alph" & w into fieldName put fieldName & " Correct" into correctField if the loc of cd fld fieldName is not within the rect of cd fld correctField then put false into allCorrect end repeat if allCorrect then rightSound else wrongSound repeat with w = 1 to 4 -- put them all back put "Alph" & w into fieldName put fieldName & " Start" into startField show cd fld fieldName at the loc of card field startField end repeat put empty into movedList end if end if end alphabetize -- part 2 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=62 top=99 right=135 bottom=99 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: HexStart -- part 3 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=20 top=129 right=147 bottom=39 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: HexCorrect -- part 1 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=65 top=101 right=133 bottom=95 -- title width / last selected line: 0 -- icon id / first selected line: 7558 / 7558 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Hex ----- HyperTalk script ----- on mouseDown moveMe HexStart, HexCorrect end mouseDown -- part 5 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=40 top=213 right=274 bottom=100 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Smiley ----- HyperTalk script ----- on mouseDown choose select tool drag from topLeft of me to bottomRight of me doMenu "Select" --tighten selection put the loc of me into oldLoc put oldLoc into newLoc -- just in case they mouse up quickly put "10,10," & width of card window - 20 & "," & height of card window - 20 into bounds repeat until the mouse is up put the mouseLoc into newLoc if newLoc is within bounds then --ignore if moved out of window drag from oldLoc to newLoc put newLoc into oldLoc end if end repeat if newLoc is within the rect of card field "CorrectLoc2" then drag from newLoc to the loc of card field "CorrectLoc2" rightSound wait 1 second else wrongSound end if doMenu "Undo" choose browse tool end mouseDown -- part 6 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=297 top=272 right=329 bottom=344 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: CorrectLoc2 -- part 11 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=206 top=62 right=87 bottom=265 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Word3 Start -- part 12 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=270 top=62 right=87 bottom=329 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Word1 Start -- part 13 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=336 top=62 right=87 bottom=395 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Word2 Start -- part 14 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=189 top=98 right=124 bottom=224 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Word1 Correct -- part 8 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=278 top=64 right=85 bottom=320 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: Word1 ----- HyperTalk script ----- on mouseDown moveMe "Word1 Start", "Word1 Correct" end mouseDown -- part 15 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=252 top=98 right=124 bottom=287 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Word2 Correct -- part 16 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=452 top=98 right=124 bottom=487 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Word3 Correct -- part 9 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=338 top=64 right=85 bottom=393 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: Word2 ----- HyperTalk script ----- on mouseDown moveMe "Word2 Start", "Word2 Correct" end mouseDown -- part 10 (field) -- low flags: 01 -- high flags: 0001 -- rect: left=210 top=64 right=85 bottom=261 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: Word3 ----- HyperTalk script ----- on mouseDown moveMe "Word3 Start", "Word3 Correct" end mouseDown -- part 21 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=119 top=137 right=159 bottom=178 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph3 Start -- part 27 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=119 top=162 right=184 bottom=178 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph4 Start -- part 28 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=181 top=137 right=159 bottom=240 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph1 Start -- part 29 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=181 top=162 right=184 bottom=240 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph2 Start -- part 30 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=253 top=149 right=171 bottom=312 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph1 Correct -- part 31 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=317 top=149 right=171 bottom=376 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph2 Correct -- part 32 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=380 top=149 right=171 bottom=439 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph3 Correct -- part 33 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=443 top=149 right=171 bottom=502 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph4 Correct -- part 34 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=183 top=139 right=157 bottom=237 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph1 ----- HyperTalk script ----- on mouseDown alphabetize short name of me end mouseDown -- part 35 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=121 top=164 right=182 bottom=175 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph4 ----- HyperTalk script ----- on mouseDown alphabetize short name of me end mouseDown -- part 36 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=121 top=139 right=157 bottom=175 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph3 ----- HyperTalk script ----- on mouseDown alphabetize short name of me end mouseDown -- part 37 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=183 top=164 right=182 bottom=237 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Alph2 ----- HyperTalk script ----- on mouseDown alphabetize short name of me end mouseDown -- part contents for card part 8 ----- text ----- rain -- part contents for card part 9 ----- text ----- Spain -- part contents for card part 10 ----- text ----- plain -- part contents for card part 34 ----- text ----- Apple -- part contents for card part 35 ----- text ----- Zebra -- part contents for card part 36 ----- text ----- Worm -- part contents for card part 37 ----- text ----- Frog